<div class="g-hd">
    <div class="m-head g-fluid">
        <div class="g-xs3" ng-bind-html="back"></div>
        <div class="g-xs6"><div class="tt">修改支付密码</div></div>
        <div class="g-xs3 f-tar" ng-bind-html="next"></div>
    </div>
</div>
<div class="g-ct">
        <div class="m-tabs f-cb">
            <div class="hd">
                <a ng-class="{'z-sel':method==1}" ng-click="method=1" href="javascript:;">凭原密码修改</a>
                <a ng-class="{'z-sel':method==2}" ng-click="method=2" href="javascript:;">凭手机验证码修改</a>
            </div>
        </div>
    <form ng-show="method==1" name="js_oldpw" type="post"  class="m-form" novalidate ng-submit="oldPwForm()">
            <div class="u-titlet f-tal">
                请输入旧密码
            </div>
           <div class="formitm f-cb">
                <div class="mn">
                    <div class="mnc">
                        <input type="password" name="password" class="input" placeholder="密码" ng-model="user.password" required  ng-minlength="3" ng-maxlength="20"/>
                        <div class="error" ng-show="js_form.password.$dirty && js_form.password.$invalid">
                            <small class="error" ng-show="js_form.password.$error.required">
                                密码为必填项.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.minlength">
                                密码长度至少为三个字符.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.maxlength">
                                密码长度不能超过20个字符.
                            </small>
                        </div>
                    </div>
                </div>
            </div>
            <div class="u-titlet f-tal">
                请输入新密码
            </div>
           <div class="formitm f-cb">
                <div class="mn">
                    <div class="mnc">
                        <input type="password" name="password" class="input" placeholder="密码" ng-model="user.password" required  ng-minlength="3" ng-maxlength="20"/>
                        <div class="error" ng-show="js_form.password.$dirty && js_form.password.$invalid">
                            <small class="error" ng-show="js_form.password.$error.required">
                                密码为必填项.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.minlength">
                                密码长度至少为三个字符.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.maxlength">
                                密码长度不能超过20个字符.
                            </small>
                        </div>
                    </div>
                </div>
            </div>
           <div class="formitm f-cb">
                <div class="mn">
                    <div class="mnc">
                        <input type="password" name="repeatPassword" class="input" placeholder="确认密码" ng-model="user.repeatPassword" required ng-change="checkPassword()" ng-class="js_form.repeatPassword.$error.repeat ? '':'ng-valid'"/>
                        <div class="error" ng-show="js_form.repeatPassword.$dirty && js_form.repeatPassword.$invalid">
                            <small class="error" ng-show="js_form.repeatPassword.$error.required">
                                密码为必填项.
                            </small>
                            <small class="error" ng-show="js_form.repeatPassword.$error.repeat">
                                两次密码输入不一致.
                            </small>
                        </div>
                    </div>
                </div>
            </div>
           <div class="formitm">
            <div class="btn"><button type="submit" ng-disabled="js_form.account.$dirty && js_form.account.$invalid ||js_form.sms.$dirty && js_form.sms.$invalid || !js_form.password.$dirty && js_form.password.$invalid || !js_form.repeatPassword.$dirty || js_form.repeatPassword.$error.repeat"><span>保存修改</span></button></div>
        </div>
    </form>
     <form ng-show="method==2" name="js_form" type="post"  class="m-form" novalidate ng-submit="smsPwForm()">
        <div class="formitm f-cb">
            <div class="mn" style="background-color: transparent;margin:-1rem 0;">
                <div class="mnc">
                    <input  type="text" name="account" disabled class="input" placeholder="138****5565" ng-model="user.phone" required ng-pattern="/^1[3|5|8]\d{9}/" ng-change ="hasMobile()"/>
                    <div class="error" ng-show="js_form.account.$dirty && js_form.account.$invalid">
                        <small class="error" ng-show="js_form.account.$error.required">
                            手机号为必填项.
                        </small>
                        <small class="error" ng-show="js_form.account.$error.pattern">
                            手机号码不正确.
                        </small>

                    </div>
                </div>
            </div>
        </div>
        <div class="formitm f-cb">
            <div class="mn" style="float:left;">
                <div class="mnc" style="margin:0 15rem 0 2rem;">
                    <input type="text" name="sms" class="input" placeholder="短信验证码" ng-model="user.sms" required ng-minlength="6"  ng-maxlength="6"  ng-change="js_form.sms.$sendError = hasError = false"/>
                </div>
            </div>
            <div class="opt">
                <a ng-hide="optValue" href="javascript:;" ng-bind-html="js_opt">获取短信验证码</a>
                <a ng-show="optValue" ng-click="getSms()" class="z-sel" href="javascript:;" ng-bind-html="js_opt">30秒后重新获取</a>
            </div>
            <div class="tip">
                <div class="error" ng-show="js_form.sms.$dirty && js_form.sms.$invalid">
                    <small class="error" ng-show="js_form.sms.$error.required">
                        验证码为必填项.
                    </small>
                    <small class="error" ng-show="js_form.sms.$error.maxlength">
                        验证码长度不能超过6个字符.
                    </small>
                </div>
                <div class="error" ng-show="js_form.sms.$sendError">
                    <small class="error" ng-show="js_form.sms.$sendError">
                        网络出错，请联系管理员.
                    </small>
                </div>
                <div class="error" ng-show="hasError" ng-bind-html="hasError"></div>
            </div>
        </div>
         <div class="formitm f-cb">
             <div class="mn">
                 <div class="mnc">
                     <input type="password" name="password" class="input" placeholder="密码" ng-model="user.password" required  ng-minlength="3" ng-maxlength="20"/>
                     <div class="error" ng-show="js_form.password.$dirty && js_form.password.$invalid">
                         <small class="error" ng-show="js_form.password.$error.required">
                             密码为必填项.
                         </small>
                         <small class="error" ng-show="js_form.password.$error.minlength">
                             密码长度至少为三个字符.
                         </small>
                         <small class="error" ng-show="js_form.password.$error.maxlength">
                             密码长度不能超过20个字符.
                         </small>
                     </div>
                 </div>
             </div>
         </div>
         <div class="formitm f-cb">
             <div class="mn">
                 <div class="mnc">
                     <input type="password" name="repeatPassword" class="input" placeholder="确认密码" ng-model="user.repeatPassword" required ng-change="checkPassword()" ng-class="js_form.repeatPassword.$error.repeat ? '':'ng-valid'"/>
                     <div class="error" ng-show="js_form.repeatPassword.$dirty && js_form.repeatPassword.$invalid">
                         <small class="error" ng-show="js_form.repeatPassword.$error.required">
                             密码为必填项.
                         </small>
                         <small class="error" ng-show="js_form.repeatPassword.$error.repeat">
                             两次密码输入不一致.
                         </small>
                     </div>
                 </div>
             </div>
         </div>
         <div class="formitm">
             <div class="btn"><button type="submit" ng-disabled="js_form.account.$dirty && js_form.account.$invalid ||js_form.sms.$dirty && js_form.sms.$invalid || !js_form.password.$dirty && js_form.password.$invalid || !js_form.repeatPassword.$dirty || js_form.repeatPassword.$error.repeat"><span>保存修改</span></button></div>
         </div>
     </form>
</div>